#!/bin/bash
#

bash_number=0
nologin_number=0

for sh_name in $(awk -F: '{print $7}' /etc/passwd);do
    if [ $sh_name == "/bin/bash" ];then
	let bash_number++
    elif [ $sh_name == "/sbin/nologin" ];then
	let nologin_number++
    fi
done

echo "bash用户数:$bash_number, nologin用户数:$nologin_number"
